package cn.tedu.boot041.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BmiController {
    @RequestMapping ("/getbmi")
    public String getbmi(double h,double w){
        double bmi=w/(h*h);
        if (bmi<18.5){
            return "偏瘦";
        }
        if (bmi<24){
            return "健康";
        }
        if (bmi<28){
            return "胖";

        }
        return "胖死了";

    }
}
